<?php

/**
 * ListTaxCodes form base class.
 *
 * @method ListTaxCodes getObject() Returns the current form's model object
 *
 * @package    erpcrm
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 24171 2009-11-19 16:37:50Z Kris.Wallsmith $
 */
abstract class BaseListTaxCodesForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'iden'        => new sfWidgetFormInputHidden(),
      'tax_code'    => new sfWidgetFormInputText(),
      'description' => new sfWidgetFormInputText(),
      'tax_rate'    => new sfWidgetFormInputText(),
    ));

    $this->setValidators(array(
      'iden'        => new sfValidatorPropelChoice(array('model' => 'ListTaxCodes', 'column' => 'iden', 'required' => false)),
      'tax_code'    => new sfValidatorString(array('max_length' => 20)),
      'description' => new sfValidatorString(array('max_length' => 100)),
      'tax_rate'    => new sfValidatorNumber(),
    ));

    $this->validatorSchema->setPostValidator(
      new sfValidatorPropelUnique(array('model' => 'ListTaxCodes', 'column' => array('tax_code')))
    );

    $this->widgetSchema->setNameFormat('list_tax_codes[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'ListTaxCodes';
  }


}
